# Use an official OpenJDK 8 runtime as a parent image
FROM openjdk:17-jdk-alpine

# Set the working directory in the container
WORKDIR /app

# Copy the executable JAR file to the container
COPY target/register.jar /app/app.jar

# Expose the port the application runs on
EXPOSE 10000

# Run the JAR file
# -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=20000
ENTRYPOINT ["sh", "-c", "exec java $JAVA_OPTS -Dname=register.jar -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -jar /app/app.jar"]
